<template>
  <input type="text" value="666">
  <input type="text" value="f">
  <input type="text" :value="f">
  <button @click="fun">点我改值</button>
  <hr>
  <!-- 不加绑定只是一个字符串 -->
  <a href="url">跳转/</a>
  <!-- 增加绑定后可以识别为响应式变量，为"v-bind"的简写 -->
  <a :href="url">跳转</a>
</template>
<script setup>
let status = 0;
import {ref} from "vue";

const f = ref('777');

const url = ref('https://www.baidu.com');

url.value='https://www.jd.com';

const fun = () => {
  status += 1;
  if (status % 2 === 1)
    f.value = ('888');
  else
    f.value = ('777');
}

</script>
<style scoped>

</style>